<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>
    h5 {
        margin: 5px 7px;
    }
    .ft12{font-size: 12px;}
    #textarea{border: none;}
</style>
<body>
{include file="common/header" /}
<div class="mui-content" id="app">
    <div class="mui-content-padded" style="margin: 5px;">
        <p class="ft12"> 仅在与商家沟通无效或找不到商家的情况下在此投诉：</p>
        <form class="mui-input-group">
            <div  class="mui-input-row">
                <label>联系电话</label>
                <input type="text" v-model="tel" class="mui-input-clear" placeholder="请输入您的联系电话" maxlength="11">
            </div>
        </form>
        <div class="mui-input-row" style="margin: 10px 5px;">
            <textarea style="background: #ffffff" v-model="feedback_content"  rows="5" placeholder="请填写您需要投诉的详细内容"></textarea>
        </div>
    </div>
    <button type="button" id="Submits" @click="SubmitsRZ()" class="mui-btn mui-btn-danger mui-btn-block">提交 </button>
</div>


<link rel="stylesheet" href="__INDEX__/css/footer.css">
{include file="common/foot"}
<script>

    var vm = new Vue({

        el: '#app',
        data: {
            tel : '',
            feedback_content : '',
        },
        methods: {
            SubmitsRZ(){
                if (this.tel == '' || this.feedback_content == ''){
                    alert('信息不完整')
                    return
                }

                var url = "{:url('/index/system/feedback')}"
                $.post(url,{
                    user_tel : this.tel,
                    feedback_content: this.feedback_content
                },(res) => {

                    if (res.state == 'success'){
                        mui.alert('投诉成功', '等待客服回访！', function() {
                            location.reload()
                        });
                    }else {
                        alert(res.msg)
                    }

                },'json')
            }
        }
    })


</script>
</body>
</html>